const env = process.env.NODE_ENV  // 环境参数

let mysql
let redis

// 开发环境
if (env === 'develop') {
  mysql = {
    host: '127.0.0.1',
    user: 'root',
    password: 'a1234567',
    database: 'blog',
    port: 3306 // your database server port, default is 3306
  }

  redis = {
    host: '127.0.0.1',
    port: 6379
  }
}

// 生产环境
if (env === 'production') {
  mysql = {
    host: '127.0.0.1',
    user: 'root',
    password: 'a1234567',
    database: 'blog',
    port: 3306 // your database server port, default is 3306
  }

  redis = {
    host: '127.0.0.1',
    port: 6379
  }
}

module.exports = {
  mysql,
  redis
}
